package cn.getech.data.development.constant;

import lombok.Getter;

@Getter
public enum ImportStatusEnum {

    SUCCESS(0 , "成功" ),
    FAIL(1 , "失败" ),
    NEED_IMPORT(2 , "待导入" ),
    IMPORT_ING(3 , "导入中" );
    private  Integer id;
    private  String  name;
    ImportStatusEnum(Integer id , String  name){
        this.id = id;
        this.name = name;
    }

    public static ImportStatusEnum ObjOf(Integer status) {
        if (status == null) {
            return null;
        } else {
            for (ImportStatusEnum s : ImportStatusEnum.values()) {
                if (s.getId() == status) {
                    return s;
                }
            }
            return null;
        }
    }
}
